﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucHangHot.ascx.cs" Inherits="TTMarketing.UserControl.ucHangHot" %>
<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="odsHot" 
    BorderWidth="0px" ItemPlaceholderID="ph" AllowPaging="True" PageSize="15" 
    Width="100%">
    <LayoutTemplate>
        <asp:PlaceHolder runat="server" id="ph" />
    </LayoutTemplate>
    <ItemTemplate>
         <table width="100%" id="Product-l">
            <tr>
                <td align="center">
                    <a href="/san-pham-hot.aspx?id=<%# Eval("ID") %>">
                <img src='<%# "/Image/Upload/" +Eval("Image") %>' height="100px" width="100px" />
                </a>
                </td>
            </tr>
            <tr>
                <td align="center" style="height:51px;">
                    <a href='<%# "/san-pham-hot.aspx?id="+Eval("ID") %>'>
                    <%# Eval("Name") %>
                    </a>
                    <br />
                    <asp:Label ID="Label4" runat="server" 
                        Text='<%# "( "+ Eval("SeriNumber")  +" )"%>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" valign="top" style="height:60px" >
                    <%# Eval("Summary").ToString().Length > 60 ? Eval("Summary").ToString().Substring(0, 59)+"..." : Eval("Summary").ToString()%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
    <EmptyDataTemplate>
        <div class="RadListView RadListView_Default">
            <div class="rlvEmpty">
                Dữ liệu đang cập nhật</div>
        </div>
    </EmptyDataTemplate>
    
</telerik:RadListView>


<asp:ObjectDataSource ID="odsHot" runat="server" 
    SelectMethod="getTopProductHot" TypeName="TTBusiness.ClassDB.clsBSProduct">
    <SelectParameters>
        <asp:Parameter DefaultValue="true" Name="hot" Type="Boolean" />
        <asp:Parameter DefaultValue="12" Name="top" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

